<template>
    <div :class="ggclass" class="row-box" ref="row" :style="{ 'grid-template-columns': repeat, 'grid-gap': gridGap }">
        <slot></slot>
    </div>
</template>

<script>
export default {
    name: "qg-row",
    props: {
        ggclass: {
            type: String,
            default: "",
        },
        gridGap: {
            type: String,
            default: "10rem",
        },
        number: {
            type: Number,
            default: 0,
        },
    },
    data() {
        return {
            repeat: "",
        };
    },
    mounted() {
        // console.dir(this.$refs.row, 'row')
        this.repeat = `repeat(${this.number || this.$refs.row.children.length},1fr)`;
    },
};
</script>

<style lang="less" scoped>
.row-box {
    display: grid;
    width: 100%;
}
</style>
